<template>
    <div id="mse"></div>
</template>

<script>
   // import HlsPlayer from 'xgplayer-hls.js';
   import FlvJsPlayer from 'xgplayer-flv.js';

    export default {
        name: "index",
        data() {
            return {}
        },
        methods: {
            init() {
                // let player = new HlsPlayer({
                //     id: 'mse',
                //     autoplay: true,
                //     playsinline: true,
                //     isLive: true,
                //     useHls: true,
                //     //cors: true,// 请求是否跨域
                //     width: 1000,
                //     height: 400,
                //     url: '/rtmpserver/hls?url=d:/zhihu-code/java/EasyMedia/video/file.mp4'
                // });
                let player = new FlvJsPlayer({
                    id: 'mse',
                    url: 'http://ios-stream.qvc.de/qvc.m3u8',
                    //isLive: true, //直播场景设置为true
                    hasVideo: true,
                    hasAudio: true,
                    flvOptionalConfig: {
                        enableWorker: true
                    } //flv.js可选配置项
                })
            }
        },
        mounted() {
            this.init()
        }
    }
</script>

<style scoped>

</style>
